#ifndef __MYADC_H_
#define __MYADC_H_

#include "main.h"
#include "../sys/delay.h"

extern ADC_HandleTypeDef hadc1;


void adc_calibrate(void);

uint32_t adc_get_result_average(uint32_t ch, uint8_t times);

uint32_t adc_get_result(uint32_t ch);

void adc_channel_set(ADC_HandleTypeDef *adc_handle, uint32_t ch, uint32_t rank, uint32_t stime);



#endif
